package com.xinhe.web.controller;

import com.xinhe.web.entity.AdapayDistributor;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/adapayDistributor")
@Api(value = "adapay分销账户", tags = "adapay分销账户")
public class AdapayDistributorController {
    /*@Autowired
    private IAdapayDistributorService adapayDistributorService;

    @ApiOperation(httpMethod = "GET", value = "分页查询adapay分销账户")
    @RequestMapping({"/pageAdapayDistributor"})
    public PageResult<AdapayDistributorView> pageAdapayDistributor(AdapayDistributorQuery query) {
        return this.adapayDistributorService.pageAdapayDistributor(query);
    }











    @ApiOperation(httpMethod = "POST", value = "保存adapay分销账户")
    @RequestMapping({"/saveAdapayDistributor"})
    public BaseResult saveAdapayDistributor(@Valid AdapayDistributorModel model, BindingResult bind) {
        if (bind.hasErrors()) {
            BaseResult result = new BaseResult();
            result.setBindingResult(bind);
            return result;
        }
        return (BaseResult)this.adapayDistributorService.saveModel((IdModel)model);
    }











    @ApiOperation(httpMethod = "GET", value = "删除adapay分销账户")
    @ApiImplicitParam(name = "adapayDistributorId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/deleteAdapayDistributor"})
    public BaseResult deleteAdapayDistributor(Long adapayDistributorId) {
        return this.adapayDistributorService.delete(adapayDistributorId);
    }











    @ApiOperation(httpMethod = "GET", value = "adapay分销账户详情")
    @ApiImplicitParam(name = "adapayDistributorId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/detailAdapayDistributor"})
    public BeanResult<AdapayDistributor> detailAdapayDistributor(Long adapayDistributorId) {
        return this.adapayDistributorService.findById(adapayDistributorId);
    }*/

}